<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.prime.com.tr/ui"
    xmlns:f="http://java.sun.com/jsf/core">

<h:head></h:head>
<body>
    <h:panelGrid style="margin:0px auto;">
        <h:graphicImage value="/images/logoLogin.png" />
    </h:panelGrid>

    <h:form>
        <p:growl id="growl" showDetail="true" life="3000" />
        <p:messages id="messages"></p:messages>
        <h:panelGrid columns="2" style="margin: 0px auto;">
            <h:outputLabel for="j_username" value="Usuario:" />
            <p:inputText id="j_username" value="#{login.usuario.username}" required="true"
                requiredMessage="Usuario es requerido" style="width: 212px;" />
            <h:outputLabel for="j_password" value="Clave:" />
            <p:password id="j_password" value="#{login.usuario.password}" required="true" requiredMessage="Clave es requerido"
                style="width: 200px;" />

            <h:outputText value="" />
            <p:commandButton value="Iniciar Session" action="#{login.doLogin}" update="growl messages" ajax="false"
                style="width: 220px;" />
        </h:panelGrid>
    </h:form>

</body>
</html>
